package com.example.demo.mapper;


import com.example.demo.model.OrderInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface OrderMapper {

    public int createOrder(@Param("uid") int uid, @Param("pid") int pid, @Param("quantity") int quantity, @Param("unitPrice") int unitPrice, @Param("traceNo") String traceNo, @Param("totalPrice") int totalPrice);

    public int updateOrderstatus( @Param("traceNo") String traceNo,@Param("paymentTime") String paymentTime);

    public List<OrderInfo> getOrderByStatus(@Param("uid") int uid, @Param("status") String status);

    //从评论表中获取订单状态
    public List<OrderInfo> getOrderByStatus1(@Param("uid") int uid, @Param("status") String status);

    public List<OrderInfo> getAllOrder(@Param("uid") int uid);

    public List<OrderInfo> getOrderById(int uid, int pid, String traceNo);
}
